.class public Lcom/instagram/android/mediacache/u;
.super Ljava/lang/Object;
.source "StrokedDelegate.java"


# instance fields
.field private final a:Landroid/graphics/Paint;

.field private final b:Landroid/graphics/RectF;

.field private final c:I


# direct methods
.method public constructor <init>(I)V
    .locals 2
    .parameter

    .prologue
    .line 16
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 17
    if-nez p1, :cond_0

    .line 18
    new-instance v0, Ljava/lang/IllegalArgumentException;

    const-string v1, "Use CircularDrawable for no stroke"

    invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 21
    :cond_0
    new-instance v0, Landroid/graphics/RectF;

    invoke-direct {v0}, Landroid/graphics/RectF;-><init>()V

    iput-object v0, p0, Lcom/instagram/android/mediacache/u;->b:Landroid/graphics/RectF;

    .line 22
    add-int/lit8 v0, p1, 0x1

    div-int/lit8 v0, v0, 0x2

    iput v0, p0, Lcom/instagram/android/mediacache/u;->c:I

    .line 24
    new-instance v0, Landroid/graphics/Paint;

    const/4 v1, 0x1

    invoke-direct {v0, v1}, Landroid/graphics/Paint;-><init>(I)V

    iput-object v0, p0, Lcom/instagram/android/mediacache/u;->a:Landroid/graphics/Paint;

    .line 25
    iget-object v0, p0, Lcom/instagram/android/mediacache/u;->a:Landroid/graphics/Paint;

    const/16 v1, 0x33

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setAlpha(I)V

    .line 26
    iget-object v0, p0, Lcom/instagram/android/mediacache/u;->a:Landroid/graphics/Paint;

    sget-object v1, Landroid/graphics/Paint$Style;->STROKE:Landroid/graphics/Paint$Style;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    .line 27
    iget-object v0, p0, Lcom/instagram/android/mediacache/u;->a:Landroid/graphics/Paint;

    int-to-float v1, p1

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStrokeWidth(F)V

    .line 28
    return-void
.end method


# virtual methods
.method a(Landroid/graphics/Canvas;)V
    .locals 2
    .parameter

    .prologue
    .line 40
    iget-object v0, p0, Lcom/instagram/android/mediacache/u;->b:Landroid/graphics/RectF;

    iget-object v1, p0, Lcom/instagram/android/mediacache/u;->a:Landroid/graphics/Paint;

    invoke-virtual {p1, v0, v1}, Landroid/graphics/Canvas;->drawOval(Landroid/graphics/RectF;Landroid/graphics/Paint;)V

    .line 41
    return-void
.end method

.method a(Landroid/graphics/Rect;)V
    .locals 2
    .parameter

    .prologue
    .line 32
    iget v0, p1, Landroid/graphics/Rect;->left:I

    iget v1, p0, Lcom/instagram/android/mediacache/u;->c:I

    add-int/2addr v0, v1

    iput v0, p1, Landroid/graphics/Rect;->left:I

    .line 33
    iget v0, p1, Landroid/graphics/Rect;->top:I

    iget v1, p0, Lcom/instagram/android/mediacache/u;->c:I

    add-int/2addr v0, v1

    iput v0, p1, Landroid/graphics/Rect;->top:I

    .line 34
    iget v0, p1, Landroid/graphics/Rect;->right:I

    iget v1, p0, Lcom/instagram/android/mediacache/u;->c:I

    sub-int/2addr v0, v1

    iput v0, p1, Landroid/graphics/Rect;->right:I

    .line 35
    iget v0, p1, Landroid/graphics/Rect;->bottom:I

    iget v1, p0, Lcom/instagram/android/mediacache/u;->c:I

    sub-int/2addr v0, v1

    iput v0, p1, Landroid/graphics/Rect;->bottom:I

    .line 36
    iget-object v0, p0, Lcom/instagram/android/mediacache/u;->b:Landroid/graphics/RectF;

    invoke-virtual {v0, p1}, Landroid/graphics/RectF;->set(Landroid/graphics/Rect;)V

    .line 37
    return-void
.end method
